<template>
	<view :class="'tui-' + align" class="om-label padding-left-sm" style="position: relative;">
		<text v-if="required && !necessaryBeforeSend" style="color:red;position: absolute;transform:translate(-10px,5px);z-index: 1;" class="padding-right-xs">*</text>
		<text v-if="necessaryBeforeSend && required" style="color:#009688 ;position: absolute;transform:translate(-11px,3px);z-index: 1;" class="padding-right-xs">#</text>
		{{ label }}
		<text v-if="showEditIcon" class="cuIcon-writefill padding-right-sm text-brown"></text>
		
	</view>
</template>

<script>
export default {
	name: 'OmLabel',
	props: {
		label: {
			type: String,
			default() {
				return '';
			}
		},
		align: {
			type: String,
			default() {
				return 'left';
			}
		},
		required: {
			type: Boolean,
			default() {
				return false;
			}
		},
		showEditIcon: {
			type: Boolean,
			default() {
				return false;
			}
		},
		necessaryBeforeSend:{
			type:Boolean,
			default(){
				return false
			}
		}
	},
	data() {
		return {};
	},
	methods: {}
};
</script>

<style>
.om-label {
	height: 100%;
	font-size: 16px;
	padding-right: 10px;
	color: #999999;
}
</style>
